﻿using System;
using System.Diagnostics.Contracts;
using OpenWaves.Web.ImageTransformations;

namespace OpenWaves.Web.Controls
{
    public class ImageTransformationFailedEventArgs : EventArgs
    {
        private readonly ImageTransformationException reason;
        public ImageTransformationException Reason
        {
            get { return reason; }
        }

        public ImageTransformationFailedEventArgs(ImageTransformationException reason)
        {
            Contract.Requires<ArgumentNullException>(reason != null);

            this.reason = reason;
        }

        public string FallbackImageUrl { get; set; }

        public bool LogError { get; set; }
    }
}